using System.ComponentModel.DataAnnotations;
using SqlSugar;

namespace FytSoa.Domain.Hr;

/// <summary>
/// HR-组织表
/// </summary>
[SugarTable("hr_organization")]
public class HrOrganization:EntityBase
{
    /// <summary>
    /// 父级编号
    /// </summary>
    [Required]
    public long ParentId { get; set; } = 0;

    /// <summary>
    /// 父级编号集合
    /// </summary>
    [SugarColumn(IsJson = true)]
    public List<string> ParentIdList { get; set; } = new ();

    /// <summary>
    /// 组织编码
    /// </summary>
    [Required]
    [StringLength(255)]
    public string Number { get; set; }

    /// <summary>
    /// 组织名称
    /// </summary>
    [Required]
    [StringLength(255)]
    public string Name { get; set; }

    /// <summary>
    /// 类型(1公司/2部门)
    /// </summary>
    [Required]
    public int Type { get; set; } = 1;

    /// <summary>
    /// 负责人
    /// </summary>
    [Required]
    public long InCharge { get; set; } = 0;
}